{ ***  cef_values_capi.h  *** }

  PCefBinaryValue = ^TCefBinaryValue;
  PCefListValue = ^TCefListValue;
  PCefDictionaryValue = ^TCefDictionaryValue;
  
  // Structure representing a binary value. Can be used on any process and thread.
  TCefBinaryValue = record
    // Base structure.
    base: TCefBase;

    // Returns true (1) if this object is valid. Do not call any other functions
    // if this function returns false (0).
    is_valid: function(self: PCefBinaryValue): Integer; cconv;

    // Returns true (1) if this object is currently owned by another object.
    is_owned: function(self: PCefBinaryValue): Integer; cconv;

    // Returns a copy of this object. The data in this object will also be copied.
    copy: function(self: PCefBinaryValue): PCefBinaryValue; cconv;

    // Returns the data size.
    get_size: function(self: PCefBinaryValue): csize_t; cconv;

    // Read up to |buffer_size| number of bytes into |buffer|. Reading begins at
    // the specified byte |data_offset|. Returns the number of bytes read.
    get_data: function(self: PCefBinaryValue; buffer: Pointer; buffer_size, data_offset: csize_t): csize_t; cconv;
  end;

  // Structure representing a dictionary value. Can be used on any process and
  // thread.
  TCefDictionaryValue = record
    // Base structure.
    base: TCefBase;

    // Returns true (1) if this object is valid. Do not call any other functions
    // if this function returns false (0).
    is_valid: function(self: PCefDictionaryValue): Integer; cconv;

    // Returns true (1) if this object is currently owned by another object.
    is_owned: function(self: PCefDictionaryValue): Integer; cconv;

    // Returns true (1) if the values of this object are read-only. Some APIs may
    // expose read-only objects.
    is_read_only: function(self: PCefDictionaryValue): Integer; cconv;

    // Returns a writable copy of this object. If |exclude_NULL_children| is true
    // (1) any NULL dictionaries or lists will be excluded from the copy.
    copy: function(self: PCefDictionaryValue; exclude_empty_children: Integer): PCefDictionaryValue; cconv;

    // Returns the number of values.
    get_size: function(self: PCefDictionaryValue): csize_t; cconv;

    // Removes all values. Returns true (1) on success.
    clear: function(self: PCefDictionaryValue): Integer; cconv;

    // Returns true (1) if the current dictionary has a value for the given key.
    has_key: function(self: PCefDictionaryValue; const key: PCefString): Integer; cconv;

    // Reads all keys for this dictionary into the specified vector.
    get_keys: function(self: PCefDictionaryValue; const keys: TCefStringList): Integer; cconv;

    // Removes the value at the specified key. Returns true (1) is the value was
    // removed successfully.
    remove: function(self: PCefDictionaryValue; const key: PCefString): Integer; cconv;

    // Returns the value type for the specified key.
    get_type: function(self: PCefDictionaryValue; const key: PCefString): TCefValueType; cconv;

    // Returns the value at the specified key as type bool.
    get_bool: function(self: PCefDictionaryValue; const key: PCefString): Integer; cconv;

    // Returns the value at the specified key as type int.
    get_int: function(self: PCefDictionaryValue; const key: PCefString): Integer; cconv;

    // Returns the value at the specified key as type double.
    get_double: function(self: PCefDictionaryValue; const key: PCefString): Double; cconv;

    // Returns the value at the specified key as type string.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_string: function(self: PCefDictionaryValue; const key: PCefString): PCefStringUserFree; cconv;

    // Returns the value at the specified key as type binary.
    get_binary: function(self: PCefDictionaryValue; const key: PCefString): PCefBinaryValue; cconv;

    // Returns the value at the specified key as type dictionary.
    get_dictionary: function(self: PCefDictionaryValue; const key: PCefString): PCefDictionaryValue; cconv;

    // Returns the value at the specified key as type list.
    get_list: function(self: PCefDictionaryValue; const key: PCefString): PCefListValue; cconv;

    // Sets the value at the specified key as type null. Returns true (1) if the
    // value was set successfully.
    set_null: function(self: PCefDictionaryValue; const key: PCefString): Integer; cconv;

    // Sets the value at the specified key as type bool. Returns true (1) if the
    // value was set successfully.
    set_bool: function(self: PCefDictionaryValue; const key: PCefString; value: Integer): Integer; cconv;

    // Sets the value at the specified key as type int. Returns true (1) if the
    // value was set successfully.
    set_int: function(self: PCefDictionaryValue; const key: PCefString; value: Integer): Integer; cconv;

    // Sets the value at the specified key as type double. Returns true (1) if the
    // value was set successfully.
    set_double: function(self: PCefDictionaryValue; const key: PCefString; value: Double): Integer; cconv;

    // Sets the value at the specified key as type string. Returns true (1) if the
    // value was set successfully.
    set_string: function(self: PCefDictionaryValue; const key: PCefString; value: PCefString): Integer; cconv;

    // Sets the value at the specified key as type binary. Returns true (1) if the
    // value was set successfully. If |value| is currently owned by another object
    // then the value will be copied and the |value| reference will not change.
    // Otherwise, ownership will be transferred to this object and the |value|
    // reference will be invalidated.
    set_binary: function(self: PCefDictionaryValue; const key: PCefString; value: PCefBinaryValue): Integer; cconv;

    // Sets the value at the specified key as type dict. Returns true (1) if the
    // value was set successfully. After calling this function the |value| object
    // will no longer be valid. If |value| is currently owned by another object
    // then the value will be copied and the |value| reference will not change.
    // Otherwise, ownership will be transferred to this object and the |value|
    // reference will be invalidated.
    set_dictionary: function(self: PCefDictionaryValue; const key: PCefString; value: PCefDictionaryValue): Integer; cconv;

    // Sets the value at the specified key as type list. Returns true (1) if the
    // value was set successfully. After calling this function the |value| object
    // will no longer be valid. If |value| is currently owned by another object
    // then the value will be copied and the |value| reference will not change.
    // Otherwise, ownership will be transferred to this object and the |value|
    // reference will be invalidated.
    set_list: function(self: PCefDictionaryValue; const key: PCefString; value: PCefListValue): Integer; cconv;
  end;

  // Structure representing a list value. Can be used on any process and thread.
  TCefListValue = record
    // Base structure.
    base: TCefBase;

    // Returns true (1) if this object is valid. Do not call any other functions
    // if this function returns false (0).
    is_valid: function(self: PCefListValue): Integer; cconv;

    // Returns true (1) if this object is currently owned by another object.
    is_owned: function(self: PCefListValue): Integer; cconv;

    // Returns true (1) if the values of this object are read-only. Some APIs may
    // expose read-only objects.
    is_read_only: function(self: PCefListValue): Integer; cconv;

    // Returns a writable copy of this object.
    copy: function(self: PCefListValue): PCefListValue; cconv;

    // Sets the number of values. If the number of values is expanded all new
    // value slots will default to type null. Returns true (1) on success.
    set_size: function(self: PCefListValue; size: csize_t): Integer; cconv;

    // Returns the number of values.
    get_size: function(self: PCefListValue): csize_t; cconv;

    // Removes all values. Returns true (1) on success.
    clear: function(self: PCefListValue): Integer; cconv;

    // Removes the value at the specified index.
    remove: function(self: PCefListValue; index: Integer): Integer; cconv;

    // Returns the value type at the specified index.
    get_type: function(self: PCefListValue; index: Integer): TCefValueType; cconv;

    // Returns the value at the specified index as type bool.
    get_bool: function(self: PCefListValue; index: Integer): Integer; cconv;

    // Returns the value at the specified index as type int.
    get_int: function(self: PCefListValue; index: Integer): Integer; cconv;

    // Returns the value at the specified index as type double.
    get_double: function(self: PCefListValue; index: Integer): Double; cconv;

    // Returns the value at the specified index as type string.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_string: function(self: PCefListValue; index: Integer): PCefStringUserFree; cconv;

    // Returns the value at the specified index as type binary.
    get_binary: function(self: PCefListValue; index: Integer): PCefBinaryValue; cconv;

    // Returns the value at the specified index as type dictionary.
    get_dictionary: function(self: PCefListValue; index: Integer): PCefDictionaryValue; cconv;

    // Returns the value at the specified index as type list.
    get_list: function(self: PCefListValue; index: Integer): PCefListValue; cconv;

    // Sets the value at the specified index as type null. Returns true (1) if the
    // value was set successfully.
    set_null: function(self: PCefListValue; index: Integer): Integer; cconv;

    // Sets the value at the specified index as type bool. Returns true (1) if the
    // value was set successfully.
    set_bool: function(self: PCefListValue; index, value: Integer): Integer; cconv;

    // Sets the value at the specified index as type int. Returns true (1) if the
    // value was set successfully.
    set_int: function(self: PCefListValue; index, value: Integer): Integer; cconv;

    // Sets the value at the specified index as type double. Returns true (1) if
    // the value was set successfully.
    set_double: function(self: PCefListValue; index: Integer; value: Double): Integer; cconv;

    // Sets the value at the specified index as type string. Returns true (1) if
    // the value was set successfully.
    set_string: function(self: PCefListValue; index: Integer; value: PCefString): Integer; cconv;

    // Sets the value at the specified index as type binary. Returns true (1) if
    // the value was set successfully. After calling this function the |value|
    // object will no longer be valid. If |value| is currently owned by another
    // object then the value will be copied and the |value| reference will not
    // change. Otherwise, ownership will be transferred to this object and the
    // |value| reference will be invalidated.
    set_binary: function(self: PCefListValue; index: Integer; value: PCefBinaryValue): Integer; cconv;

    // Sets the value at the specified index as type dict. Returns true (1) if the
    // value was set successfully. After calling this function the |value| object
    // will no longer be valid. If |value| is currently owned by another object
    // then the value will be copied and the |value| reference will not change.
    // Otherwise, ownership will be transferred to this object and the |value|
    // reference will be invalidated.
    set_dictionary: function(self: PCefListValue; index: Integer; value: PCefDictionaryValue): Integer; cconv;

    // Sets the value at the specified index as type list. Returns true (1) if the
    // value was set successfully. After calling this function the |value| object
    // will no longer be valid. If |value| is currently owned by another object
    // then the value will be copied and the |value| reference will not change.
    // Otherwise, ownership will be transferred to this object and the |value|
    // reference will be invalidated.
    set_list: function(self: PCefListValue; index: Integer; value: PCefListValue): Integer; cconv;
  end;

    // Creates a new object that is not owned by any other object. The specified
    // |data| will be copied.
    tfn_cef_binary_value_create = function(
        const data: Pointer;
        data_size: csize_t): PCefBinaryValue; cdecl;

    // Creates a new object that is not owned by any other object.
    tfn_cef_dictionary_value_create = function: PCefDictionaryValue; cdecl;

    // Creates a new object that is not owned by any other object.
    tfn_cef_list_value_create = function: PCefListValue; cdecl;
